package com.crl.module.dragger.events{

	import com.crl.geom.IntPoint;
	import com.crl.module.dragger.AbstractDragger;
	import com.crl.module.dragger.SourceData;
	
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.geom.Point;
	
	
	/**
	 *  用于拖曳中的事件;
	 * @author crl
	 * 
	 */	
	public class DragEvent extends MouseEvent{
		
		/**
		 * 确认用户想拖; 
		 */		
		public static const DRAG_RECOGNIZED:String = "dragRecognized";	
		
		/**
		 * 开始拖动;  
		 */		
		public static const DRAG_START:String = "dragStart";	
	
		/**
		 * 拖入感应区域 
		 */		
		public static const DRAG_ENTER:String = "dragEnter";	
			
		/**
		 * 拖入感应区域 后在上面的移动都会触发此事件; 
		 */		
		public static const DRAG_OVERRING:String = "dragOverring";	
		
		/**
		 * 拖出感应区域 
		 */		
		public static const DRAG_EXIT:String = "dragExit";	
		
		/**
		 * 放入感应区域  
		 */		
		public static const DRAG_DROP:String = "dragDrop";		
		
		/**
		 * 拖动的对像; 
		 */		
		public var dragInitiator:AbstractDragger;
		
		/**
		 * 拖动物品所带的数据; 
		 */		
		public var sourceData:SourceData;
		
		
		/**
		 * 
		 * @param type
		 * @param dragInitiator
		 * @param sourceData
		 * @param ctrlKey
		 * @param altKey
		 * @param shiftKey
		 * 
		 */		
		public function DragEvent(type:String, 
			dragInitiator:AbstractDragger, sourceData:SourceData,ctrlKey:Boolean=false,altKey:Boolean=false,shiftKey:Boolean=false){
			super(type, false, false);
			this.dragInitiator = dragInitiator;
			this.sourceData = sourceData;
			
			this.ctrlKey=ctrlKey;
			this.altKey=altKey;
			this.shiftKey=shiftKey;
		}
		
		override public function clone():Event{
			return new DragEvent(type, dragInitiator, sourceData,ctrlKey,altKey,shiftKey);
		}
	}
}